package com.mes.cloud.service;

import com.github.pagehelper.PageInfo;
import com.mes.cloud.dto.BmeBcFunDTO;
import com.mes.cloud.util.CommPager;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * bme_bc_fun基础表
 *
 * @author xhy
 * @date 2019/05/09 16:00
 */
public interface BmeBcFunService {

    /**
     * 根据条件获取bme_bc_fun基础表列表
     *
     * @param condition
     * @return List<BmeBcFunDTO>
     * @author xhy
     * @date 2019/05/09 16:00
     */
    public List<BmeBcFunDTO> getBmeBcFunList(Map<Object, Object> condition);

    /**
     * 获取bme_bc_fun基础表的最大记录数
     *
     * @param condition
     * @return long
     * @author xhy
     * @date 2019/05/09 16:00
     */
    public long getBmeBcFunCount(Map<Object, Object> condition);

    /**
     * 新增bme_bc_fun基础表
     *
     * @param bmeBcFunDTO
     * @return long
     * @author xhy
     * @date 2019/05/09 16:00
     */
    public long insertBmeBcFun(BmeBcFunDTO bmeBcFunDTO);

    /**
     * 更新bme_bc_fun基础表
     *
     * @param bmeBcFunDTO
     * @return long
     * @author xhy
     * @date 2019/05/09 16:00
     */
    public long updateBmeBcFun(BmeBcFunDTO bmeBcFunDTO);

    /**
     * 删除bme_bc_fun基础表
     *
     * @param id
     * @return long
     * @author xhy
     * @date 2019/05/09 16:00
     */
    public long delBmeBcFunById(String id);

    /**
     * 根据bme_bc_fun基础表标识获取bme_bc_fun基础表
     *
     * @param id
     * @return long
     * @author xhy
     * @date 2019/05/09 16:00
     */
    public BmeBcFunDTO getBmeBcFunById(String id);

    /**
     * 分页
     *
     * @param map
     * @return
     */
    CommPager<BmeBcFunDTO> findPageList(Map<Object, Object> map);

    /**
     * 批量删除
     *
     * @param map
     * @return
     */
    Long batchDelete(Map<Object, Object> map) throws Exception;

    long enable(Map<Object, Object> map) throws Exception;

    /**
     * 导出
     *
     * @param file
     * @return
     */
    int importExcel(MultipartFile file) throws Exception;

    /**
     * 导出
     *
     * @param map
     * @param response
     */
    void exportFile(Map<Object, Object> map, HttpServletResponse response) throws Exception;

    /**
     * 启用禁用 批量
     *
     * @param map
     * @return
     * @throws Exception
     */
    Long batchEnable(Map<Object, Object> map) throws Exception;
}
